package DARCOServer.security;
import java.security.Security;
import java.security.interfaces.RSAPrivateCrtKey;
import java.security.interfaces.RSAPublicKey;

import org.bouncycastle.jce.provider.BouncyCastleProvider;


import DARCOShared.utils.SecurityUtilities;



public class SecurityManager {
	public static final String ServerPrivateKey = "rO0ABXNyAEJvcmcuYm91bmN5Y2FzdGxlLmpjYWpjZS5wcm92aWRlci5hc3ltbWV0cmljLnJzYS5CQ1JTQVByaXZhdGVDcnRLZXlsuofOAnNVLgIABkwADmNydENvZWZmaWNpZW50dAAWTGphdmEvbWF0aC9CaWdJbnRlZ2VyO0wADnByaW1lRXhwb25lbnRQcQB+AAFMAA5wcmltZUV4cG9uZW50UXEAfgABTAAGcHJpbWVQcQB+AAFMAAZwcmltZVFxAH4AAUwADnB1YmxpY0V4cG9uZW50cQB+AAF4cgA/b3JnLmJvdW5jeWNhc3RsZS5qY2FqY2UucHJvdmlkZXIuYXN5bW1ldHJpYy5yc2EuQkNSU0FQcml2YXRlS2V5RusJwAfPQRwDAAJMAAdtb2R1bHVzcQB+AAFMAA9wcml2YXRlRXhwb25lbnRxAH4AAXhwc3IAFGphdmEubWF0aC5CaWdJbnRlZ2VyjPyfH6k7+x0DAAZJAAhiaXRDb3VudEkACWJpdExlbmd0aEkAE2ZpcnN0Tm9uemVyb0J5dGVOdW1JAAxsb3dlc3RTZXRCaXRJAAZzaWdudW1bAAltYWduaXR1ZGV0AAJbQnhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cP///////////////v////4AAAABdXIAAltCrPMX+AYIVOACAAB4cAAAAQCarRlHkNsJVEtiB7GD1BpQleq7eU2nuXNORU8KB49szcmMsECmt3UFdDNu5cTXz3UStHXjgVfSzGc1qsydunBdn2PjvCqIiFO84zISZyCthdfFp0Z+H6X/Oh8zQjk+cn6MclUQzOLxDnbz1zAr0ieClF4OEX5ACPYjQvYgbZseoToDvmIMfHaT+gzWQfWKFpTle5MzXQDVEE534bOV1dHFDNSBMXoFHtpECmcQEpYbA/Qr3Py+5kMtYtBvlfcGarGVip3DAEHpd/PdyRP+XyJX6981uE8Y4M51w2+FexgsEZGsAqdA0uq93rn1HK8n/mdsn6NDLiasdkqQWMiaWug9eHNxAH4ABP///////////////v////4AAAABdXEAfgAIAAABAFsq08+ezbu994CcUEEHb0s4UdaWNPM7F3920pNyyVK0KKvH5xNc5piEWRxwSYl6OeMAgsvJnN4epGa5eUkubrSAEfxVGCzJTbHzp7u5FUWxsfBKG/6S4OCCfYlU6zCng3d8nC7+1HSItgwbNcVeZPNOR/G61dMgdRNrkG6kq91s9zuZ/xHCPMEOGeC+hfFZGakWEWdTMg3i23OsIFTgHVHmjMzBetemLxSMA5g00mii1H/GpscUvG58CiBizVS9ZZvO1gCjN5S/F2rrI/BuCpJmFPP9iVKUtNk0LXqLhQrIwy7E2x8/y5YjE9xQQmzz7LlNZMrZtE1mP/mLqbcDeYF4eHNxAH4ABP///////////////v////4AAAABdXEAfgAIAAAAgEh2jv8wS1w22cOVEjkzgDd2Hfy3TEGTi9Q4Hz99zrBkB25dZpALggrcNw87Z7Ke7xwpt4jGCB5ybOGGkxeqksZwa+FDs9KxLTAm9aeiUGRt2goj/yMqUSbtlyqDrvtbLf7KlmRKJIMe7RTi56GEUK+RkL+gZ/AosZ+aJ0tyNdsJeHNxAH4ABP///////////////v////4AAAABdXEAfgAIAAAAgAyacCs6C1NrQuJs/9o8QQy7tvWmWlmTQ+IaePQjIlTMJAgCuMvb0DeTES3xrFh82E8T5Js7q5/KWoZAhdYUw1AoxaU48/vtGp96K2NfnJJWVVCLuPPnDk6K1Gjl69N1wioWIv4p0KvSWxxEaLStd/Siyga0MKZpDrqMx4kZH3hpeHNxAH4ABP///////////////v////4AAAABdXEAfgAIAAAAgDIFRFUKLB4/MK/DQ7bVeHACSe/8Ogki0Jbarr9f8Pp0+ltdoSklIVofKlKt2qleFgi1S2FM7F7sUyTVFKeOqMtBqGERBvWhAzs+kKeYa+2w2D+/gl69OoZDG8abLzAa6vBwsX26ovtKrerni+a8rm4QG7R6Ngkl2oJg5Sext0VBeHNxAH4ABP///////////////v////4AAAABdXEAfgAIAAAAgNIsWHAvU92Dmjsjtv5QNLKIg2k4q/b8UR+NCB34WBCTh+RMqDqqaTntjKNL135Rm2s7xyQbBhaJdz7c9eCkPlV4GvezeVkNUwayJiRpyKCxrdnD6IZzDQB3Ae+8j+tCKGBtPq8mGJloBinrN/X61H5KLCHBryKiqdwCvc9RdkOFeHNxAH4ABP///////////////v////4AAAABdXEAfgAIAAAAgLxm9tpua7PlYkPan0fQrGUlOOITr5JBlb2MB3IIeswucfCUuSA5l7StytOC9lZJM4kNmIUf3N0rspHVxGTNCmLJjs/DYmDeHV7GnoQxuMNWIH6GciTzxxWBJezMplww5AlaEd4Li5AmRUpZjZG4/AndiiGDoHngvswGs70C7WNZeHNxAH4ABP///////////////v////4AAAABdXEAfgAIAAAAAwEAAXg=";
	
	public static void Initialize(){
		Security.addProvider(new BouncyCastleProvider());
	}

	public static RSAPublicKey getPublicKey(){
		return SecurityUtilities.String2PublicKey(SecurityUtilities.ServerPublicKey);
	}
	
	public static RSAPrivateCrtKey getPrivateKey(){
		return SecurityUtilities.String2PrivateKey(ServerPrivateKey);
	}

	
}
